package com.example.zhinongbao.model;

import java.io.Serializable;

public class Product implements Serializable {
    private int id;
    private String name;
    private double price;
    private int imageResId;
    private String description;
    private String location; // 发货地/产地字段

    public Product(int id, String name, double price, int imageResId, String description, String location) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.imageResId = imageResId;
        this.description = description;
        this.location = location;
    }

    // Getters
    public int getId() { return id; }
    public String getName() { return name; }
    public double getPrice() { return price; }
    public int getImageResId() { return imageResId; }
    public String getDescription() { return description; }
    public String getLocation() { return location; } // 新增产地获取方法

    // Setters (可选)
    public void setLocation(String location) {
        this.location = location;
    }
}